<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>EPICS exampleJava/powerSupplyt</title>
  <link rel="stylesheet" type="text/css"
  href="http://epics-pvdata.sourceforge.net/base.css" />
  <link rel="stylesheet" type="text/css"
  href="http://epics-pvdata.sourceforge.net/epicsv4.css" />
  <style type="text/css">
/*<![CDATA[*/
     .about { margin-left: 3em; margin-right: 3em; font-size: .83em}
     table { margin-left: auto; margin-right: auto }
     .diagram { text-align: center; margin: 2.5em 0 }
     body { margin-right: 10% }
/*]]>*/</style>

 <!-- Script that generates the Table of Contents -->
  <script type="text/javascript" src="http://epics-pvdata.sourceforge.net/script/tocgen.js"></script>

</head>

<body>

<div class="head">
<h1>EPICS exampleJava/powerSupply</h1>
<h2 class="nocount">2016.08.26</h2>

<h2 class="nocount">Abstract</h2>
<p>
<b>powerSupply</b> is an example of creating a service that requires a somewhat complicated top level PVStructure. Look at the code for details.
</p>

</div> <!-- head -->

<div id="toc">
  <h2 class="nocount">Table of Contents</h2>
</div>

<!-- Place what you would like in the Table of Contents, inside the contents div -->
<div id="contents" class="contents">	  
<hr />


<h2>Overview</h2>
<p>This is an example of creating a service that requires a somewhat complicated
           top level PVStructure.</p>

<p>The example has a top level pvStructure:
</p>
<pre>
structure
    alarm_t alarm
    time_t timeStamp
    structure power
        double value
    structure voltage
        double value
    structure current
        double value
</pre>
<p>It is designed to be accessed via a channelPutGet request.
The client sets power.value and voltage.value
When the record processes it computes current.value.
In addition the timeStamp is set to the time when process is called.</p>
<h2>Start Example</h2>
<p>All of the following are run in the powerSupply directory.
The examples are for linux.
For windows a .bat file is also provided.
</p>
<dl>
    <dt>Start Server</dt>
    <dd>
<pre>
scripts/powerSupplyMain
</pre>
     </dd>
     <dt>Start monitor</dt>
     <dd>
<pre>
scripts/powerSupplyMonitor
</pre>
    </dd>
    <dt>Start client on linux</dt>
    <dd>
<pre>
scripts/powerSupplyClient
</pre>
    </dd>
</dl>
<p><b>NOTE:</b> The client ends by requesting a voltage of 0.
This results in the power supply record thowing an exception.
This results in problems including the powerSupplyMonitor no longer updating.
Needs investigation.
</p>

</div> <!-- class="contents" -->
</body>
</html>
